// Copyright DustedPixels.com 2008. All rights reserved.

package kroff;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class AndGate implements Runnable {
  private final Pin input1;
  private final Pin input2;
  private final Pin output;

  public AndGate(Pin input1, Pin input2, Pin output) {
    this.input1 = input1;
    this.input2 = input2;
    this.output = output;
  }
  
  public void run() {
    output.set(input1.get() && input2.get());
  }
}
